// pages/index/mindEvaluate/qxtest/qxtest.js
const app = getApp();
Page({
  data: {
    onShow1: false,
    onShow2: true,
    url: '',
    id: '',
    heartmark: [],
  },
  onChange(){
    this.setData({
      onShow1: !this.data.onShow1,
      onShow2: !this.data.onShow2
    })
  },
  goIndex(){
    wx.navigateTo({
      url: '../mindEva',
    })
  },
  onLoad(options){
    this.setData({
      id: options.id,
      url: app.globalData.URL,
    });
    let that = this;
    console.log(this.data.id);
    wx.request({
      url: that.data.url+'heartmark/findById',
      method: 'GET',
      data:{
        id:that.data.id,
      },
      success(resp){
        let result = resp.data;
        that.setData({
          heartmark: result.data
        })
        console.log(that.data.heartmark);
      }
    })
  }
})